import { Body, Inject, Post, Provide } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { BusinessProductABatchEntity } from '../../../../entity/product/a_batch';
import { BusinessProductABatchService } from '../../../../service/product/a_batch';


/**
 * 用户
 */
@Provide()
@CoolController({
  api: ['info'],
  entity: BusinessProductABatchEntity,
  service: BusinessProductABatchService,
})
export class BusinessAppProductAListController extends BaseController {
  @Inject()
  businessProductABatchService: BusinessProductABatchService;

  /**
   * 获取分页数据
   * { page: 1, size: 20, sort: 'desc', order: 'createTime' }
   */
  @Post('/page', { summary: '获取分页数据' })
  async getPageByUser(@Body() body) {
    const result = await this.businessProductABatchService.getPageByUser(body)
    return this.ok(result);
  }
}